﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data;
using System.Data.SqlClient;
using Model;
namespace DAL
{
    public class DAL_Vips
    {
        public static object PD_SF_HY(string VipID ) {
            string sql = @" select GradeID from Vips
 where VipID=@VipID";
            List<SqlParameter> list = new List<SqlParameter>
            {
                new SqlParameter("@VipID",VipID)
            };
            return DBHelper.Chadanzhi(sql, list.ToArray());
        }

        public static object HYDJ(string VGID)
        {
            string sql = @" select VGDiscount from VIPGrade
 where VGID=@VGID";
            List<SqlParameter> list = new List<SqlParameter>
            {
                new SqlParameter("@VGID",VGID)
            };
            return DBHelper.Chadanzhi(sql, list.ToArray());
        }

        public static SqlDataReader CX_HY_XMDJ(string VipID)
        {
            string sql = @"  select VipName,VGName from Vips as vp
 join VIPGrade	as vg
 on
 vg.VGID=vp.GradeID
 where VipID=@VipID";
            List<SqlParameter> list = new List<SqlParameter>
            {
                new SqlParameter("@VipID",VipID)
            };
            return DBHelper.Zhilianshi(sql, list.ToArray());
        }
    }
}
